package com.ethink.warehouse.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.info.SubWarehouseInfo;
import com.ethink.warehouse.api.request.SubWarehouseAddRequest;
import com.ethink.warehouse.api.request.SubWarehouseQueryRequest;
import com.ethink.warehouse.api.request.SubWarehouseStatusSetRequest;
import com.ethink.warehouse.api.request.SubWarehouseUpdateRequest;
import com.ethink.warehouse.api.response.SubWarehouseAddResponse;

import java.util.List;
import java.util.Map;

/**
 * 仓库分仓 Service接口
 *
 * @author default
 * @date 2022-11-01
 */
public interface SubWarehouseService {

    /**
     * 分页查询
     *
     * @param request
     * @return
     */
    Page<SubWarehouseInfo> querySubWarehouse(SubWarehouseQueryRequest request);

    /**
     * 查询详情
     *
     * @param subWarehouseId
     * @return
     */
    SubWarehouseInfo getSubWarehouseById(Long subWarehouseId);

    /**
     * 查询列表
     *
     * @return
     */
    List<SubWarehouseInfo> listSubWarehouse();

    /**
     * 查询列表
     *
     * @return
     */
    Map<String, SubWarehouseInfo> listSubWarehouseMap();

    /**
     * 新增
     *
     * @param request
     * @return
     */
    SubWarehouseAddResponse addSubWarehouse(SubWarehouseAddRequest request);

    /**
     * 修改
     *
     * @param request
     * @return
     */
    void updateSubWarehouse(SubWarehouseUpdateRequest request);

    /**
     * 更新状态
     *
     * @param request
     * @return
     */
    void setSubWarehouseStatus(SubWarehouseStatusSetRequest request);

    SubWarehouseInfo getSubWarehouseByCode(String subWarehouseCode);
}